<!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>

    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap/js/bootstrap-treeview.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap/js/bootstrap.addtabs.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap/js/bootstrap-table.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap/js/bootstrap-table-zh-CN.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap/js/bootbox.js"></script>
    <script type="text/javascript" src="../js/bootstrap/js/fileinput.js"></script>
    <script type="text/javascript" src="../js/bootstrap/js/zh.js"></script>
    <link rel="stylesheet" href="../js/bootstrap/css/fileinput.css" />
    <link rel="stylesheet" href="../js/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="../js/bootstrap/css/bootstrap-treeview.min.css" />
    <link rel="stylesheet" href="../js/bootstrap/css/bootstrap.addtabs.css" />
    <link rel="stylesheet" href="../js/bootstrap/css/bootstrap-table.min.css" />
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        li {
            list-style: none;
        }
        a  {
            text-decoration: none;

        }
        .tab-content{

            height: 450px;
            width: 100%;
            background-color: transparent;
        }
        .tab-content h1{
            color: whitesmoke;
            padding-top: 20px;
        }
        #nav{
            width: 83%;
            float: left;
            height: 60px;
        }
        #accordion{
            width: 220px;
            height: 600px;
            float: left;
            background-color: whitesmoke;
        }
        #accordion h3{
            color: #0066ff;
        }
        #myTabs{
            width: 103%;
        }
    </style>
</head>
<body>
<div class="panel-group" id="accordion">
    <div>
        <h3> &nbsp; &nbsp;家庭后台管理系统</h3>
    </div>
    <br>
    <div id="mytree">

    </div>


</div>
<!--右侧头部导航栏-->
<nav class="navbar navbar-default navbar-static-top" role="navigation" id="nav">
    <div class="container-fluid">

        <!-- <div class="navbar-header">
            <a class="navbar-brand" href="#">菜鸟教程</a>
        </div> -->
        <div>
            <ul class="nav navbar-nav navbar-left">
                <li><a href="#"><img src="../img/消息.png"></a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">

                <li><a href="#"><img src="../img/圆_消息.png"></a></li>
                <li class="dropdown">
                    <a href="" class="dropdown-toggle" data-toggle="dropdown">
                        <img src="../img/王冠.png">
                        Dais mwx <b class="caret"></b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="#">我的资料</a></li>
                        <li><a href="#">重置密码</a></li>
                        <li><a href="#">退出系统</a></li>

                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>

<div class="col-md-10">
    <!-- 选项卡 -->
    <div id="myTabs">
        <!-- 新选项卡 -->
        <ul class="nav nav-tabs" id="tablist">
            <li role="presentation" class="active">
                <a href="../kk" role="tab" data-toggle="tab">欢迎</a></a>
            </li>
        </ul>

        <!-- 选项卡下内容 -->
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="home">
                <h1 align="center"></h1>

            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">

    $(function(){
        // inittable();
        initTree();


    })

    //初始化树
    function initTree(){
        $("#mytree").treeview({
            data:getTree(),//数据
            backColor:"whitesmoke",
            selectedBackColor:"#0066ff",
            onNodeSelected:function(event, node) {
                $.addtabs({iframeHeight: 570});
                //选项卡
                $.addtabs.add({
                    id:node.id,
                    title:node.text,
                    url:node.href
                });
            }
        });

    }
    //定义树里的数据来源
    function getTree(){
        var data = [
            {
                "id":1,
                "text":"<img src='../img/显示器.png'> 工作台",
                "pid":1,
                "href":"../kk",
                "image": '',

                "selectable":true
            },


            {
                "id":2,
                "text":"<img src='../img/签约%20确认签约%20电子签约.png'> 签约管理",
                "pid":2,
                "href":null,
                "nodes":[
                    {
                        "id":2,
                        "text":"待处理签约",
                        "pid":2,
                        "href":"../show",
                        "nodes":null,
                        "selectable":true
                    },{
                        "id":3,
                        "text":"签约记录",
                        "pid":2,
                        "href":"../show2",
                        "nodes":null,
                        "selectable":true
                    },

                ],

                "selectable":false
            },

            {
                "id":3,
                "text":"<img src='../img/通讯录.png'> &nbsp;通讯录",
                "pid":3,
                "href":null,
                "nodes":[
                    {
                        "id":4,
                        "text":"待处理服务",
                        "pid":2,
                        "href":"../lxb",
                        "nodes":null,
                        "selectable":true
                    },{
                        "id":5,
                        "text":"服务记录",
                        "pid":2,
                        "href":"../serviceLog",
                        "nodes":null,
                        "selectable":true
                    },

                ],

                "selectable":false
            },

            {
                "id":8,
                "text":"<img src='../img/用户头像.png'> &nbsp;居民管理",
                "pid":3,
                "href":"../manager",

                "selectable":true
            },

            {
                "id":3,
                "text":"<img src='../img/24gf-folderOpen.png'> &nbsp;资料管理",
                "pid":3,
                "href":null,
                "nodes":[
                    {
                        "id":6,
                        "text":"用户管理",
                        "pid":2,
                        "href":"show.html",
                        "nodes":null,
                        "selectable":true
                    },

                ],

                "selectable":false
            },
            {
                "id":3,
                "text":"<img src='../img/数据01.png'> &nbsp;资料管理",
                "pid":3,
                "href":null,
                "nodes":[
                    {
                        "id":7,
                        "text":"用户管理",
                        "pid":2,
                        "href":"show.html",
                        "nodes":null,
                        "selectable":true
                    },

                ],

                "selectable":false
            },
            {
                "id":10,
                "text":"<img src='../img/用户头像.png'> &nbsp;居民管理",
                "pid":3,
                "href":"../manager",

                "selectable":true
            },

        ];
        return data;
    }

</script>
</html>